<template>

	<div class="mt-4 flex justify-center">
		<el-pagination v-model:page-size="page.pageNum" v-model:current-page="page.page"
			:page-sizes="[15, 50, 100, 200]" layout="prev, pager, next, sizes, total" :total="total"
			:hide-on-single-page="true" @current-change="current" @size-change="sizechange" />
	</div>

</template>

<script lang="ts" setup>
let emit = defineEmits(['exposeData', 'fraction'])
/**
  * page-size 每页条数
	* current-page 当前页数
	* total 总条数
	* */
let props = defineProps({
	total: { // 总条数
		type: Number,
		default: 0
	},
	page: {
		type: Object,
		default: {
			page: 1,
			pageNum: 15
		}
	}
})

let current = (e) => {
	emit('exposeData', e)
}

let sizechange = (e) => {
	emit('fraction', e)
}

</script>
